#!/bin/sh
while true
do
ps -ef | grep "shoutao.jar" | grep -v "grep"
if [ "$?" -eq 1 ]
then
java -jar /root/software/shoutao.jar &
echo "process has been restarted!"
else
echo "process already started!"
fi
sleep 10
done